#pragma once

#include "Globals.h"
#include "Rect.h"

namespace game_engine { namespace physics
{

class PhysicsUtils
{
private:
    static FLOAT32 CONSTANT;

public:
    PhysicsUtils(void);
    virtual ~PhysicsUtils(void);

    static const utils::Point makeStepInDirection(const utils::Point &currentPosition, 
        const FLOAT32 angle, const FLOAT32 speed, const FLOAT32 scale);
    static const BOOL collisionDetected(const utils::Rect &rectA, 
        const utils::Rect &rectB);
    static const utils::Point makeStepTowards(const utils::Point &currentPosition, 
        const utils::Point &destination, const FLOAT32 speed, const FLOAT32 scale);
    static const FLOAT32 computeAngle(const utils::Point &p1, const utils::Point &p2);
    static const FLOAT32 distSQ(const utils::Point &p1, const utils::Point &p2);
    static const FLOAT32 dist(const utils::Point &p1, const utils::Point &p2);
    static const utils::Point toward(const utils::Point &p1, const utils::Point &p2);
    static const utils::Point scale(const utils::Point &p, const FLOAT32 mag);
    static const BOOL nearTo(const utils::Point &p1, const utils::Point &p2, const FLOAT32 d);

};

}}
